using System.Web.Mvc;
using Tribality.Repository;

namespace Tribality.Controllers
{
    public interface IPairRequestController
    {
        ViewResult List(int? pageNumber);
    }

    public class PairRequestController : ControllerBase, IPairRequestController
    {
        private IPairRequestRepository pairRequestRepository;
        public const int PAGE_SIZE = 20;

        public PairRequestController(IPairRequestRepository pairRequestRepository1)
        {
            this.pairRequestRepository = pairRequestRepository1;
        }

        public ViewResult List(int? pageNumber)
        {
            int firstPage = pageNumber ?? 1;
            return View(pairRequestRepository.GetPage(firstPage, PAGE_SIZE));
        }

    }
}